package per.sen.shopping.infrastructure.common.response;

public enum CustomCode {
    OK(200, "操作成功"),
    FAILED(-1, "操作失败"),
    ILLEGAL_PARAM_EXCEPTION(-300001, "参数校验异常"),
    EXE_DB_EXCEPTION(-300002, "执行SQL异常"),
    SYS_UNKNOWN_EXCEPTION(-300003, "系统未知异常"),
    SUPPORTED_METHOD_EXCEPTION(-300004, "请求类型异常"),
    PARAM_BIND_EXCEPTION(-300005, "参数绑定异常"),
    NO_AUTHENTICATE(-300006, "您没有权限操作"),
    USER_AUTHENTICATE_FAIL(-300008, "用户认证失败"),
    REQUEST_RIBBON(-300009, "非法请求"),
    FEIGN_SERVICE_EXCEPTION(-300010, "远程服务异常"),

    //##############用户模块#################
    USER_NO_AUTHORITY(-400001, "您无权限访问"),
    NO_USER(-400002, "用户不存在"),
    TOKEN_ILLEGAL(-400003, "access-token认证失败"),

    TOKEN_EXPIRE(-400004, "access-token已过期"),
    TOKEN_EXAMINE_FAIL(-400005, "access-token不存在"),

    LOGIN_EXPIRE(-400006, "用户未登录或登录已过期"),
    USER_PHONE_ERROR(-400007, "用户手机号格式错误"),
    USER_HAS_REGISTRY(-400008, "该用户已注册"),
    USERNAME_OR_PASSWORD_ERROR(-400009, "用户名或密码错误"),
    USER_RIBBON(-400010, "该账户已禁用"),
    TOKEN_PARSE(-400011, "access-token解析失败"),
    USER_HISTORY_INFO_ERROR(-400012, "用户登录历史记录保存失败"),
    USER_PHONE_HAS_REGISTRY(-4000013, "该手机号已注册"),
    REMOTE_LOGIN(-4000014, "账号异地登录"),
    TOKEN_RESET(-4000015, "长期操作过程中,为了保护您的安全,请重新登录"),

    GET_ROLE_FAIL(4000016, "用户角色获取失败"),
    EXIST_USER(-4000017, "用户名或手机号存在");


    private  Integer code;
    private  String message;

    CustomCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }



}
